package com.huangwenshuo.futurestarschoolmanagement.pojo.vo;

import com.huangwenshuo.futurestarschoolmanagement.pojo.enums.RequestStateEnum;

public class Result<T> {
    private int status;
    private String msg;
    private T data;

    public Result() {
    }

    public Result(T data) {
        this.data = data;
        this.msg = RequestStateEnum.SUCCESS.display();
        this.status = RequestStateEnum.SUCCESS.value();
    }

    public int getStatus() {
        return this.status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMsg() {
        return this.msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return this.data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String toString() {
        return "Result{status=" + this.status + ", msg='" + this.msg + '\'' + ", data=" + this.data + '}';
    }

}
